#-*_ coding：utf-8 -*-
import requests

# class Bysms(object):
#     def __init__(self):
#         self.host = "http://127.0.0.1"
#
#     def login(self):
#         Login_Url=self.host+"/api/mgr/signin"
#         headers={
#         "Proxy-Connection": "keep-alive",
#         "User-Agent":"ua.random",
#         "Connection":"keep-alive",
#         "Content-Type":"application/x-www-form-urlencoded"}
#         json = {'username':'byhy','password':'88888888'}
#         response = requests.post(url=Login_Url,data=json,headers=headers)
#         cookie=response.cookies.get_dict()
#         for k in cookie:
#             key=k
#             value=cookie[k]
#         cookies=key+"="+value
#
#         return cookies
#
#     def customers(self):
#         Api_Url = self.host+"/api/mgr/customers"
#         headers = {
#         "Proxy-Connection": "keep-alive",
#         "User-Agent":"ua.random",
#         "Connection":"keep-alive",
#         "Content-Type":"application/x-www-form-urlencoded","cookie":Bysms().login()}
#         data={"action":"list_customer","pagesize":"10","pagenum":"1","keywords":" "}
#         response = requests.get(url=Api_Url,params=data,headers=headers)
#         print(Bysms().login())
#         print(response.content.decode(encoding="utf8"))
#
# if __name__ == '__main__':
#     Bysms().customers()

import requests
url="https://a.heyuapp.cn/wxgate4/security/msgcheck/a_spcar"
headers={
    "Content-Type":"application/json"
}


info=requests.post(url,headers=headers,json={"content": "习近平1234"}).content.decode()
print(info)